package com.zking.ssm.service.impl;

import com.zking.ssm.mapper.SysMenuMapper;
import com.zking.ssm.model.SysMenu;
import com.zking.ssm.service.ISysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysMenuServiceImpl implements ISysMenuService {

    @Autowired
    private SysMenuMapper sysMenuMapper;

    @Override
    public int deleteByPrimaryKey(Long menuId) {
        return sysMenuMapper.deleteByPrimaryKey(menuId);
    }

    @Override
    public int insert(SysMenu record) {
        return sysMenuMapper.insert(record);
    }

    @Override
    public int insertSelective(SysMenu record) {
        return insert(record);
    }

    @Override
    public SysMenu selectByPrimaryKey(Long menuId) {
        return sysMenuMapper.selectByPrimaryKey(menuId);
    }

    @Override
    public int updateByPrimaryKeySelective(SysMenu record) {
        return sysMenuMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SysMenu record) {
        return sysMenuMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<SysMenu> userMenuList(SysMenu sysMenu) {
        return sysMenuMapper.userMenuList(sysMenu);
    }

    @Override
    public List<SysMenu> menuList(SysMenu sysMenu) {
        return sysMenuMapper.menuList(sysMenu);
    }

    @Override
    public List<SysMenu> roleMenu(SysMenu sysMenu) {
        return sysMenuMapper.roleMenu(sysMenu);
    }

    @Override
    public List<SysMenu> noRoleMenu(SysMenu sysMenu) {
        return sysMenuMapper.noRoleMenu(sysMenu);
    }

    @Override
    public List<SysMenu> list(SysMenu sysMenu) {
        return sysMenuMapper.list(sysMenu);
    }

    @Override
    public List<SysMenu> userTowMenuList(SysMenu sysMenu) {
        return sysMenuMapper.userTowMenuList(sysMenu);
    }

    @Override
    public int addMenuToRole(SysMenu sysMenu) {
        return sysMenuMapper.addMenuToRole(sysMenu);
    }

    @Override
    public int removeMenuToRole(SysMenu sysMenu) {
        return sysMenuMapper.removeMenuToRole(sysMenu);
    }

    @Override
    public Long SelectHas(SysMenu sysMenu) {
        return sysMenuMapper.SelectHas(sysMenu);
    }

    @Override
    public List<SysMenu> listAll(SysMenu sysMenu) {
        return sysMenuMapper.listAll(sysMenu);
    }
}
